#include "../../framework/framework.h"
#include "../inc/xRes.h"
namespace Sky
{

	TVoid xAppResBase::invokeCreate( xDxApp* app )
	{
		for(xResList::iterator i = xGlobal<xResList>::get().begin();i != xGlobal<xResList>::get().end();++i)
		{
			(*i)->Create(app);
		}
	}

	TVoid xAppResBase::invokeDelete( xDxApp* app )
	{
		for(xResList::iterator i = xGlobal<xResList>::get().begin();i != xGlobal<xResList>::get().end();++i)
		{
			(*i)->Delete(app);
		}
	}
	TVoid xDevResBase::invokeCreate( xDevice* dev )
	{
		for(xDevResList::iterator i = xGlobal<xDevResList>::get().begin();i != xGlobal<xDevResList>::get().end();++i)
		{
			(*i)->Create(dev);
		}
	}
	TVoid Sky::xDevResBase::invokeDelete( xDevice* dev )
	{
		for(xDevResList::iterator i = xGlobal<xDevResList>::get().begin();i != xGlobal<xDevResList>::get().end();++i)
		{
			(*i)->Delete(dev);
		}
	}
	TVoid Sky::xDevResBase::invokeLost(xDevice* dev)
	{
		for(xDevResList::iterator i = xGlobal<xDevResList>::get().begin();i != xGlobal<xDevResList>::get().end();++i)
		{
			(*i)->Lost(dev);
		}
	}
	TVoid Sky::xDevResBase::invokeReset(xDevice* dev)
	{
		for(xDevResList::iterator i = xGlobal<xDevResList>::get().begin();i != xGlobal<xDevResList>::get().end();++i)
		{
			(*i)->Reset(dev);
		}
	}
}

